package com.cskaoyan.exception.wx_comment;

import com.cskaoyan.bean.wx_resp.WxRespVo;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * 类<code>Doc</code>用于：TODO
 *
 * @author Acher
 * @version 1.0
 * @date 2021-10-23
 */
@RestControllerAdvice
public class WxCommentExceptionControllerAdvice {

    @ExceptionHandler(WxCommentEmptyException.class)
    public WxRespVo commentEmptyException(WxCommentEmptyException ex) {
        return WxRespVo.error(ex.getMessage());
    }

    @ExceptionHandler(WxUserEmptyException.class)
    public WxRespVo wxUserEmptyException(WxUserEmptyException ex) {
        return WxRespVo.error(ex.getMessage());
    }
}
